<?php

class authenticationActions extends sfActions {
    
    public function executeIndex(sfWebRequest $request){
        
    }
    
    public function executeLogin(sfWebRequest $request){
        $this->getUser()->setAuthenticated(true);
        return $this->redirect('@homepage');
    }
    
    public function executeLogout(sfWebRequest $request){
        $this->getUser()->setAuthenticated(false);
        $this->getUser()->getAttributeHolder()->clear();
        $this->getUser()->setFlash('success_notification','Has salido del sistema');
        return $this->redirect('@homepage');
    }
    
}